{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/usr/local/lib/python3.6/site-packages/h5py/__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.\n",
      "  from ._conv import register_converters as _register_converters\n",
      "Using TensorFlow backend.\n"
     ]
    }
   ],
   "source": [
    "from keras.datasets import mnist\n",
    "from keras.layers import Flatten, Conv2D, MaxPool2D, Dense, Input,AveragePooling2D,Reshape,Activation\n",
    "from keras.models import Sequential, Model\n",
    "from keras.optimizers import SGD\n",
    "from keras.utils import plot_model, to_categorical\n",
    "\n",
    "import matplotlib.pyplot as plt"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "(x_train, y_train), (x_test, y_test) = mnist.load_data()\n",
    "#数据变成TensorFow为Backend的形式\n",
    "x_train=x_train.reshape(60000,28,28,1)\n",
    "x_test=x_test.reshape(10000,28,28,1)\n",
    "#把标签变成one-hot编码的形式\n",
    "y_train=to_categorical(y_train,num_classes=10)\n",
    "y_test=to_categorical(y_test,num_classes=10)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "_________________________________________________________________\n",
      "Layer (type)                 Output Shape              Param #   \n",
      "=================================================================\n",
      "conv2d_45 (Conv2D)           (None, 28, 28, 8)         208       \n",
      "_________________________________________________________________\n",
      "conv2d_46 (Conv2D)           (None, 28, 28, 8)         72        \n",
      "_________________________________________________________________\n",
      "max_pooling2d_5 (MaxPooling2 (None, 14, 14, 8)         0         \n",
      "_________________________________________________________________\n",
      "conv2d_47 (Conv2D)           (None, 14, 14, 16)        3216      \n",
      "_________________________________________________________________\n",
      "conv2d_48 (Conv2D)           (None, 14, 14, 16)        272       \n",
      "_________________________________________________________________\n",
      "max_pooling2d_6 (MaxPooling2 (None, 7, 7, 16)          0         \n",
      "_________________________________________________________________\n",
      "flatten_31 (Flatten)         (None, 784)               0         \n",
      "_________________________________________________________________\n",
      "dense_59 (Dense)             (None, 120)               94200     \n",
      "_________________________________________________________________\n",
      "dense_60 (Dense)             (None, 84)                10164     \n",
      "_________________________________________________________________\n",
      "dense_61 (Dense)             (None, 10)                850       \n",
      "_________________________________________________________________\n",
      "activation_13 (Activation)   (None, 10)                0         \n",
      "=================================================================\n",
      "Total params: 108,982\n",
      "Trainable params: 108,982\n",
      "Non-trainable params: 0\n",
      "_________________________________________________________________\n"
     ]
    }
   ],
   "source": [
    "NIN = Sequential()\n",
    "NIN.add(Conv2D(input_shape=(28,28,1), filters= 8, kernel_size = (5,5),padding = 'same',activation = 'relu'))\n",
    "NIN.add(Conv2D(input_shape=(28,28,1), filters= 8, kernel_size = (1,1),padding = 'same',activation = 'relu'))\n",
    "NIN.add(MaxPool2D(pool_size=(2,2), strides=2))\n",
    "NIN.add(Conv2D(16,(5,5),padding = 'same',activation = 'relu'))\n",
    "NIN.add(Conv2D(16,(1,1),padding = 'same',activation = 'relu'))\n",
    "NIN.add(MaxPool2D(pool_size=(2,2), strides=2))\n",
    "NIN.add(Flatten())\n",
    "NIN.add(Dense(120,activation = 'relu'))\n",
    "NIN.add(Dense(84,activation = 'relu'))\n",
    "NIN.add(Dense(10))\n",
    "NIN.add(Activation('softmax'))\n",
    "NIN.summary()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Epoch 1/10\n",
      "60000/60000 [==============================] - 23s 386us/step - loss: 0.6457 - acc: 0.8714\n",
      "Epoch 2/10\n",
      "60000/60000 [==============================] - 23s 377us/step - loss: 0.1116 - acc: 0.9656\n",
      "Epoch 3/10\n",
      "60000/60000 [==============================] - 22s 373us/step - loss: 0.0794 - acc: 0.9751\n",
      "Epoch 4/10\n",
      "60000/60000 [==============================] - 23s 377us/step - loss: 0.0640 - acc: 0.9801\n",
      "Epoch 5/10\n",
      "60000/60000 [==============================] - 22s 373us/step - loss: 0.0535 - acc: 0.9831\n",
      "Epoch 6/10\n",
      "60000/60000 [==============================] - 23s 390us/step - loss: 0.0455 - acc: 0.9848\n",
      "Epoch 7/10\n",
      "60000/60000 [==============================] - 24s 394us/step - loss: 0.0395 - acc: 0.9878\n",
      "Epoch 8/10\n",
      "60000/60000 [==============================] - 24s 393us/step - loss: 0.0342 - acc: 0.9887\n",
      "Epoch 9/10\n",
      "53632/60000 [=========================>....] - ETA: 2s - loss: 0.0306 - acc: 0.9905"
     ]
    }
   ],
   "source": [
    "NIN.compile(optimizer=SGD(lr=0.01),loss = 'categorical_crossentropy', metrics=['accuracy'])\n",
    "# x_train,y_train,x_test,y_test = preprocess()\n",
    "history3 = NIN.fit(x_train,y_train,epochs=10,batch_size=128,shuffle=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "_________________________________________________________________\n",
      "Layer (type)                 Output Shape              Param #   \n",
      "=================================================================\n",
      "conv2d_7 (Conv2D)            (None, 24, 24, 8)         208       \n",
      "_________________________________________________________________\n",
      "max_pooling2d_3 (MaxPooling2 (None, 12, 12, 8)         0         \n",
      "_________________________________________________________________\n",
      "conv2d_8 (Conv2D)            (None, 8, 8, 16)          3216      \n",
      "_________________________________________________________________\n",
      "max_pooling2d_4 (MaxPooling2 (None, 4, 4, 16)          0         \n",
      "_________________________________________________________________\n",
      "flatten_8 (Flatten)          (None, 256)               0         \n",
      "_________________________________________________________________\n",
      "dense_14 (Dense)             (None, 120)               30840     \n",
      "_________________________________________________________________\n",
      "dense_15 (Dense)             (None, 84)                10164     \n",
      "_________________________________________________________________\n",
      "dense_16 (Dense)             (None, 10)                850       \n",
      "=================================================================\n",
      "Total params: 45,278\n",
      "Trainable params: 45,278\n",
      "Non-trainable params: 0\n",
      "_________________________________________________________________\n"
     ]
    }
   ],
   "source": [
    "# 构建LeNet-5网络\n",
    "lenet = Sequential()\n",
    "lenet.add(Conv2D(input_shape = (28,28,1), filters=8, kernel_size=(5,5), padding='valid', activation='relu'))\n",
    "lenet.add(MaxPool2D(pool_size=(2,2), strides=2))\n",
    "lenet.add(Conv2D(input_shape=(16,16,8), filters=16, kernel_size=(5,5), padding='valid', activation='relu'))\n",
    "lenet.add(MaxPool2D(pool_size=(2,2), strides=2))\n",
    "lenet.add(Flatten())\n",
    "lenet.add(Dense(120, activation='relu'))\n",
    "lenet.add(Dense(84, activation='relu'))\n",
    "lenet.add(Dense(10, activation='softmax'))\n",
    "lenet.summary()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Epoch 1/10\n",
      "60000/60000 [==============================] - 10s 172us/step - loss: 0.4354 - acc: 0.8739\n",
      "Epoch 2/10\n",
      "60000/60000 [==============================] - 10s 168us/step - loss: 0.1316 - acc: 0.9594\n",
      "Epoch 3/10\n",
      "60000/60000 [==============================] - 10s 169us/step - loss: 0.0968 - acc: 0.9703\n",
      "Epoch 4/10\n",
      "60000/60000 [==============================] - 10s 166us/step - loss: 0.0791 - acc: 0.9758\n",
      "Epoch 5/10\n",
      "60000/60000 [==============================] - 10s 169us/step - loss: 0.0669 - acc: 0.9795\n",
      "Epoch 6/10\n",
      "60000/60000 [==============================] - 10s 172us/step - loss: 0.0591 - acc: 0.9813\n",
      "Epoch 7/10\n",
      "60000/60000 [==============================] - 10s 172us/step - loss: 0.0514 - acc: 0.9840\n",
      "Epoch 8/10\n",
      "60000/60000 [==============================] - 11s 179us/step - loss: 0.0452 - acc: 0.9858\n",
      "Epoch 9/10\n",
      "60000/60000 [==============================] - 10s 172us/step - loss: 0.0408 - acc: 0.9869\n",
      "Epoch 10/10\n",
      "60000/60000 [==============================] - 10s 172us/step - loss: 0.0370 - acc: 0.9886\n"
     ]
    }
   ],
   "source": [
    "lenet.compile(loss='categorical_crossentropy', optimizer=SGD(lr=0.01), metrics=['accuracy'])\n",
    "lenet_history = lenet.fit(x_train, y_train, batch_size=128, epochs=10)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYUAAAEWCAYAAACJ0YulAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAIABJREFUeJzt3Xl8VfWd//HXJzcbgYQtARJCCAouIBAUUMBqF+vSBW1rLVoXnGmZmda2Th1bnc7POv6mv2mrM+209dHWVqu1rrW2QystdndBLagogiKLLEGQhD0hez6/P85JchOykeTkJrnv5+NxH/fec77n3E+ukne+53vO95i7IyIiApCS6AJERGTgUCiIiEgzhYKIiDRTKIiISDOFgoiINFMoiIhIM4WCJBUzu9fM/qObbbeZ2XlR1yQykCgURESkmUJBZBAys9RE1yBDk0JBBpzwsM2NZvaqmVWa2d1mNt7MfmtmR8zsD2Y2Oq79YjNbb2YHzewvZnZq3Lo5ZvZSuN0jQGabz/qQma0Nt11lZrO6WeMHzexlMztsZjvN7NY2688O93cwXL80XD7MzP7LzLab2SEzeyZc9m4zK23nezgvfH2rmT1mZj8zs8PAUjObb2bPhZ+x28y+Z2bpcdvPMLPfm9l+M3vHzP7VzCaY2VEzGxvX7nQzKzOztO787DK0KRRkoPoY8H7gJODDwG+BfwXyCP6//TyAmZ0EPARcH65bAfzazNLDX5C/Au4HxgA/D/dLuO0c4B7gH4CxwA+B5WaW0Y36KoGrgVHAB4F/MrNLwv1ODuv9blhTCbA23O4O4AxgYVjTl4DGbn4nFwOPhZ/5ANAA/DOQCywA3gd8JqwhG/gD8DugAJgK/NHd9wB/AS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fdfQ5QCSTlGJyZjSY4ojAFKACGm9mVia0qeskSCt25X3TSMLM0gkB4wN0fT3Q9CbYIWGxm2wgOK77XzH6W2JISqhQodfem3uNjBCGRjM4D3nL3MnevAx4HFia4psglSyh0537RScHMjOB48evu/t+JrifR3P1mdy9092KC/y/+5O5D/q/Bjrj7HmCnmZ0cLnofsCGBJSXSDuAsM8sK/928jyQYdI/0dpwDRUf3i05wWYmyCLgKWGdma8Nl/xreOlUE4HPAA+EfUFuBaxNcT0K4+wtm9hjwEsFZey+TBNNdaJoLERFpliyHj0REpBsUCiIi0kyhICIizRQKIiLSTKEgIiLNFAoi/cjM3q2ZWGUgUyiIiEgzhYJIO8zsSjP7m5mtNbMfhvdbqDCzb4Xz6//RzPLCtiVm9ryZvWpmvwznzMHMpprZH8zsFTN7ycxODHc/Iu5+BQ+EV8uKDAgKBZE2zOxU4BPAIncvARqATwLDgTXuPgP4K/DVcJOfAl9291nAurjlDwB3uvtsgjlzdofL5wDXE9zb4wSCq8xFBoSkmOZC5Di9DzgDWB3+ET8M2EswtfYjYZufAY+H9x8Y5e5/DZffB/zczLKBie7+SwB3rwYI9/c3dy8N368FioFnov+xRLqmUBA5lgH3ufvNrRaa/Z827Xo6R0xN3OsG9O9QBhAdPhI51h+BS81sHICZjTGzyQT/Xi4N21wBPOPuh4ADZvaucPlVwF/Du9qVmtkl4T4yzCyrX38KkR7QXygibbj7BjP7N+BJM0sB6oDPEtxwZn64bi/BuAPANcAPwl/68bOKXgX80MxuC/fx8X78MUR6RLOkinSTmVW4+4hE1yESJR0+EhGRZuopiIhIM/UURESkmUJBRESaKRRERKSZQkFERJopFEREpNn/ByaSElbv5a/fAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# summarize history for accuracy\n",
    "plt.plot(lenet_history.history['loss'])\n",
    "plt.plot(history3.history['loss'])\n",
    "plt.title('model accuracy')\n",
    "plt.ylabel('loss')\n",
    "plt.xlabel('epoch')\n",
    "plt.legend(['lenet loss','NIN loss'], loc='upper right')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
